Autoscroll logic refined.