bugfix to flush the waypoint queue every time the successor state changes