Fixed small bug in Widget.js