rfe-1502 : Smart sorting for int keys

Signed-off-by: Chanaka Dharmarathna <pe.chanaka.ck@gmail.com>
Merge pull request #1343 from Chanaka/RFE-1502

rfe-1502 : Smart sorting for int keys