fix a bunch of stuff