Fixed py3 support