Error control and clean