corrects errors in sql file