fix bitwise AND to bool conversion