When undoing state changes, restore the old state at the same time when it was left