Correct some logic.