My mistake with the counting sort