fixing an issue in which the scroll bar was not being updated when widgets were closed/hidden