Fix check for namespaces