fix trimming of namespace