Bug fixes to namespace