bunch of random fixes