fix the compatibility with Python2.5