fix bug for stock out