Fix for IE duplicating widgets

Improved inject JS functionality