try to fix the background issues and add idempotency