fixing boolean comparisons