fix bug where partially filled orders were being discarded