Fixed #1728: fixed null pointer exception on search
Merge pull request #1742 from dinhviethoa/1728-npe-search

Fixed #1728: fixed null pointer exception on search