Compile-time and test fixes