Fixed python3 support