fix recursive searching