Correct various codes