bugfixes in url handling and parsing