Sort the array before we parse it