more fixes for py2.5