Fixed an error with python 2.6