fix some annoying resize bugs with the sidepanel and the library