Discard invalid results before running select
Merge branch 'issues/197-some-searches-cause-an-error'