Fix misspelled 'opts' variable usage

The minor misspelling would result in a crash when using the search parameter.