Fixed a bug with the widget class resizing the view at the wrong time