Fixed some bugs in the trade market system.