fixed bug when creating user