minor changes for py 3.*