fix change password and error handling