Sale of wrong lots makes it seem like I had losses and wash sales; how to correct?

When I sold some stock lots turns out the unintended lots sold, and as a result my broker statement shows a large disallowed wash sale. Using sample values:

1. purchased lotA for $1000

2. much later stock price fell, purchased lotB for $100

3. few days later wanted to sell lotB for $120. sadly lotA sold, so looks like loss of -$880

4. few days later purchased lotC for $60

5. few days later wanted to sell lotC for $80. sadly lotB sold, so loss off -$20

6. much later stock price rose, wanted to sell lotA for $1100. But lotC sold, gain of $1040

 

so although the overall gain should be $140 (three gains of 20,20,100), looks like I have a gain of $1040 and two wash sales of $900, which are disallowed. I never intended to sell at a loss, and even chose the lots carefully, but somehow the wrong ones got chosen, so looks like I sold at a loss.

 

What are my options here? I haven't yet contacted the broker, but not sure they can swap lots a many months after the fact. Is there a form to use to correct such problems?