Attempted fix at a bug with scroll spy.