Made py2and3 compatible with py2.5