bug fixed

There might be an optimization to stop searching?