fixed concurrency issue in search plugin