Correction of logic