Fix door-disappearing bug on undo