repair syntax errors