remove syntactic errors