Fixed Undefined variable: waypoints