fix judging logic of NameSpace