Bug fix for malformed URLs