clean up syntax errors