Fix bug where namespace is dropped