update searching for partial names
* fix issues in @Paul-Davis 's comments in #839
* remove debug statement