Fixed race condition with block scan