Fix C++ issues (bug #'s 3425, 3426)