Fixed error in creating the widget.js