backported Jonathan Wilkes' info classes
fixed discrepancy between scrollbar position and the amount of scroll taking place