fixed possiblility of a zero result in sale sequence