Fixed the widget command a little. Added extra debug into widget_factory.