[FEAT] Fix sorting function to correctly sort Ints