fixed bug where autopilot turns off when last waypoint is reached.