fixed NameSpace in GetFirstPattern