bug fix in reset_password method