Fixed migration bug