fixing bug with conditions to be clustered