Fix bug that manifests when run in Python 3

This bug was introduced in pull request #26 commit
6524b30ada1d67eb277ee842bce8beafca57fe28.