remove trailing ‘/‘ as namespace can be empty.