fix trailing slash may garbage url construction