bug fix on stock take