Fixed a bug in all_motors_stopped handling