Changed to sort on keylist()