fix search functions