fix bug for stockout