Fixed Python2.6 incompatibility bug