Fixed minor bug when reading waypoints