Fix bug with endpoints