Fix resizing properly, including initial sizing of the component