Made the script idempotent #2