Fix for Python 3