logic and bugfix ns: argument

logic didn't work in some cases for namespace filter.