I have a T3 and T5008 from the same investment that was cashed out this year. If I enter both slips I get deducted twice. Should I only enter one slip?

T5008 shows capital gains in box beside box 21.  When I enter this slip info, there is nowhere to enter the capital gains but the differnce between boxes 21 and 20 show a gain.

T3 shows Capital Gains in box 21

If enter both slips, my refund is deducted twice.