fixed a whole bunch of things