fix broken tests on py3