added error check for waypoint removal