condition migration bug fix