work-around for bug in sort(keys(dict))