Fix for resetpassword functionality