fix bug where current widget is None