Dealing with url doubling