inventory bug fix