Fixed some examples that didn't work with Python 3.