Fixed undefined search function.