fix some syntax errors for various python versions, I hope