Fixed race condition involving scalar reset