fix reset password by email function