Fix inverted condition by switching then and else parts.