Fixing migration bug