some fixes in condition generation