Fixed py3 incompatibility.