Fix imports and dict.values() bug in Py3.