Fixed registrating the widgets with the agents