final fixes for migration