Fix the bug of role is nil when create a new user