fixing c++ compilation