Fixes minor runtime errors from switching to C++ style