fix search routine. closes #174