fix URL handling