handle malformed url