Fix a logical flaw