integrate minor C++ fixes from @mscdex - refs #223