Fix URL parsing off by one error and typo