Fix weird boolean conditions