bugfixed for search