Change logic for CI.stop() - Set INSTANCE = null after the ci.shutdown.complete event, not before.