Added fixes for trade offers.

Also removed a warning