fixed bug that was omitting the orphan removal query from running during the migration.