update tests and fix regressions