how to get the correct sort order for integers?