Added support for numerical sorting to initSort.

Added support for numerical sorting to initSort.