Fixed bugs for document title/filename. and 0 results returned case