bugfix for cpp