Improved sort order for maps