lots of test fixes