Fixes for widget.py