More Python 3 compatibility fixes
Fixing examples for Python 3 compatibility