Update widget.js

small bugfix