Fix cp problems and regressions