changed the way namespaces are checked

Change-Id: If9763dac6bdd5e47edfcacbf4f52c785dc16d206