fixes for pdf export of search and bug with BGDI