fixed an unexpected error with autoscroll