Clean up syntactic errors from rough editing