fix for python2.6 compatibility