avoided adding extra commands to the undo redo stack