fixed URL parsing and extension