More URL handling fixes