FIX: racing condition in chain example