Fixing migration errors