BUG: fix for deprecated c++code