fix some bugs,move the strip_namespace method into Globals