Added a fix for Python2.6