MT#7239 fix uri creation

maybe related: MT#5615
(cherry picked from commit 69773db995cefb1a89eb8b3026e4dc79e61630c4)