remove useless waypoints