fixed uri trimming