fixed boolean evaluation