Applied fix mentioned in #133 by SoftwareMaven for Python 3 compatibility.