test fixes and compatibility fixes