Fix dict's compability with Py3.