Fix failing tests after switching to @CS, workaround some @CS bugs