Python3 fix: need to cast dictkeys to list.