fix a bug of generation for user model