attempting to make plugin more portable