fix namespace errors found by cppcheck

Unfortunately, cppcheck did not return with a non-zero error code.
Therefore, the error messages were not noticed until now.