Added 'Invalid URL' check