Quick fix to make it work with Python 3