Changed lexical sorting to numeric sorting