Fixed python3 compatibility issues
Merge remote-tracking branch 'origin' into patch-1