fix to work with python 2.5