Fixes issue if undo while there is nothing more to undo