Added vertical scroll position check.