I'm trustee of a complex trust and can allocate capital gains to the beneficiaries. I distributed $3,000 of $5,000 of the cg. What do I enter as distributions and alloc?

If I enter $5,000 as allocable and $3,000 as attributable to income, Schedule D, line 18(a) allocates the entire $5,000 to the beneficiary and $0 to the trust, but the K-1 correctly shows $3,000 cap gain distributed.  If I enter $3,000 allocable and $5,000 attributable, Sched D line 18(a) correctly allocates $3,000 to beneficiary, but the K-1 shows less than $3,000.  I can't find any combination of the two numbers that allocates $3,000 to the beneficiary in both the Schedule D and the K-1.  What should I enter?