Fixed a bug causing encoded URLs not to parse properly