writeWidgetTypeAndName minor fix