API bug fix - user endpoint