Added support for numerical sorting to initSort.