Fix data type sorting