correctly convert sort order list to str, small lint fixes