fixes to python 2.6; closes #1