Fix code of function to get title of the URL.