Fix a bug that prevent from login.