fix incompatibility with python 2.6