Fix bug with namespace handling