sort function returns zero for same values

LF at EOF seems to be removed by github online editor
sorry...