Fixing the examples for Py3 compatibility