Fix issue with kill_controller not working in certain environments