Merge "Fixed some logic in the stack scroller algorithm"