Rewrite plugin handling
Fixes issue plugin config will be ignored