fix auto-scroll calculation
Merge pull request #125 from wolfmanx/fix-auto-scroll

fix auto-scroll calculation
Merge pull request #1 from mar10/master

update from master