Made waypoint upload more robust.