Fix to work with Python 2.5