Small changes to URL handling