Fixed bug on python 2.6.*