fixed error in createUser