In ClickMenu the menu items history and delete are registered
below the moreoption items. Within the more option items a check
is done against the delete menu item which never exists at that
point of code execution. Move this piece of code above moreoptions.