fix bugs in stock add