Fixed issue with Python 3 compat.