Minor Adjustments to regex
Added plugin checking