fixed recursion fail
fixed search