In the presence of atmospheric oxygen, chloroform may generate phosgene, which would react with methanol to form dimethyl carbonate, via methyl chloroformate as the intermediate. For this reason sometimes commercial chloroform is conditioned with ethanol.