fixed issue with right click, fixed local undo