py3 correction on dict