fixed a bug that created wrong menu items when multiple tabs were open, changed how memento obj is obtained by the click handler