Fix boolean conditions