Fixed searching race condition error