migration bug fix