fix error when search does not return any result