Fix incorrect boolean calculation.