only show scroll bar when necessary