Various minor changes to correct issues tripping up the migration script.