fixed migration bug