doc and test fixes