Changed sort order so empty columns go to the end.