Fixing namespace issues for exceptions