Repair addMenuItem.