fixing a bug in the trade gains calculation where it attempted to include all balances instead of just the selected ones
0.4.1