Preinstall migration script repaired