Fix bugs of password reset