better boolean handling in comparisons