Fixed auto-refresh interrupting sorting.

Closes #306.