Fixed py3 reduce