Added idempotency guard.