Fixed multithread bugs in waypoint objects