fixed an issue with waypoints