pseudo-fix cpp side effect issues