one last fix to search function