Fixes tests on py3