Issue 398

Wanted to fix the issue, but also wanted to make the code a little easier to understand
Man, this Python 3 compatibility thing is new to me!  I'll make the change.  Thanks for the reference page!