Fixed misstype inside sorting algorithm