fix plugin instances global scope