Fixed a bug where the url would sometimes not be parsed right