fix waypoints bug. closes #360