fixed the bug for search stuff that has NULL in it