Fixing run-once logic