fix URL parsing