fixed trade bug