Fixed a bug where encoded urls didn't work as expected.