Fix inverted logic