fix for py2.6 and lower