fix NPE for menus when ctree/jar cannot be loaded