fix crashing case when invalid url
remove unused functionality