Fix some inverted comparisons