Fixed a bug that prevent user registration.