I have an error when redoing/undoing