Improve scrolling logic for course outline