Update SP11_migration_repair.js

bugs squashed. This is ready.