Fix migration script
Merge branch 'master' into stable