cleanup and fix regressions