fixed some search functions