Tune the autohighlight function