fixed small bugs in trade