update addAllNamespaces function for namespace in multi position,this will be little slower than before