Fix small problems in Widget.js