fix random hash sorting