Fixed endpoint mapping bugs