bunch of random fixes really