Fixed the sort of MATLAB support