Fix for #30

Issue #30: An initial (although a bit greedy) fix, based on selecting the first available column and sorting on that.

Please review.