More fixes to password recovery