Fix Recursive function in AutoScrollBehavior