Fixes to the namespace bugs