added sorting key for digest issue