Fixed locking on search