Correct several errors