fix checkMenuItem and checkMenuName creating objects from wrong classes