fixing bug in fixOldPasswords code