Fixing autoscrolling issue