fix url generation when a context path is set