Fix undo for layers move