Fixed bug when creating a new user