fix error when multiple plugins exist in directory