python3 compatibility issues