make plugin more flexible. SM
fix