fixing migration bugs