Fix rootwidget handling