fix last waypoint crash of location-based traking