Fixed bug for invalid url