fix overflowing check on root els, better cache
fix overflowing check on root els, better cache

tonyrft/smoothscroll,KillerJK/smoothscroll,wskplho/smoothscroll,wskplho/smoothscroll,tonyrft/smoothscroll,KillerJK/smoothscroll