Fixed py3 TypeError.