repairing errors