Added version checking for persistent undo