fixed some bugs in namspace