Fix migration script