fixing up a bug where undefined paths were causing searches to not return anything