Updated loading of windows so the controller is also saved on the widget