correct several errors