some fixes for py 2.5