migration script update, minor fixes