Fix url parsing, issue 274