Fix engine thread start/stop