scrolling now works for edge cases