some fixing to make the migration work. BTW the migration is done now