Correction for a logical error