Introducted a undo treshold