making scrollspy work nicely when the page is resized