URL handling fixes