remove trailing backslash in ns