Fixes many glitches of migration