Several bug fixes on the toolbar refreshing.