Fixing bug compatibility for Python 2.5