Fix Python2.x and Python3.x incompatibilities.