fix migration bug