Added the undo function on right click