fix some bugs with widget