Attempt for compatibility with Python 3