Try to make it work with Python 3