Fixed the filtering logic for urls