Fix duplicate confirm code