Can anyone confirm this for me?

I'm looking at the Bekcer MC for S-Corps and I had a question w/ the following information:

100% ownership of S-Corps

Beginning basis = 25,000

Ordinary income= 1,000

L-T Capital loss= 3,000

S-Corp cash distribution to owner: 30,000

How much of the 30,000 distribution is taxable to the shareholder?

I initially got the question wrong because I remembered that distributions were only non-taxable to the extent of basis (AFTER distributions are subtracted). Therefore, I thought that the taxable distribution would be:

25,000 + 1,000 =26,000 basis - 30,000 distribution = 4,000 distribution is taxable.

However, does the rule of the loss limitation only apply if the loss in question is an ordinary loss... not a capital loss?

The correct answer is 7,000 [(25+1-3)-30].