Fixed bug, where autoscrolling changes its direction automatically