Fixed undoing after saving makes negative changes