The undo will work no matter what, now when I see I built the system to avoid double entries if x is on top then I don't place it on the stack again, and when the room is switched I place "switch" on the stack, if you were to switch 2 times and undo, it would happen only one time, the only thing messed up is that rest of it works sorta, though sorry about it should have added one, glad you had fun.