removing syntactic errors