Fixes #186. Python3 incompatibility.