fixed server crashing bugs. attempted to fix tradeFinalize but it didn't work.  Crashes on line 367.