a bunch of random fixes