Fixed bugs in getAllTrips() and getAllWaypoints()