refine global plugin handling fixes #30