more fixes for migration