Fixed endpoint bug