fix conditional date pair problem