Several test fixes