Fix some problems with password reset