fix call to split, add handling for query string in url