fix retrocompatibility python 2.6