fix converting selected dicts after sorting