Fixes /'dict_keys' object has no attribute 'sort'/ on Python 3.2