fixed a bunch of broken stuff