bug fixed for when doc is null and crawling