Fix inverted condition