fixes bug with url construction