python package and test fixes