Tweaking hash sorting