fix some errors in namespacing system