Fixed issue with poorly formed urls