Fix for #653 (Passwords preprended during upgrade)