Fixing autoscroll, now it works with print method.