Bug fixes when namespace is specified to specs

Bug fixes when namespace is specified to specs