fixed problem where script does not find a headline element and posts a junk query