fix fetch search and broken output