Fix "not" in logic statements