LImit the number of changes for correcting scroll to avoid infinite loop.