BUG fixed search function