fix 'dict_items' object has no attribute 'sort'
Merge pull request #626 from fprimex/fprimex-sorted-items

fix 'dict_items' object has no attribute 'sort'