writeWidgetInit fixed