fixed a bunch of python stuff