fixed a python 2.6 compatibility problem