Fixed addMultipleNamespaces and added a test