Py3-related random fixes