Chemists help chocolate maker’s banish an unsightly problem.