fixes to migration script and UI