Fixed bug in userAPI