refactored enabling of sidebar scrollbar