Fix inverted if