Fixed bug when creating user