autoscroll and history sorting issue #51