migration script related fixes