Fix some logic.