fix migration script