Update widgets.py, fix #17