fixing inventory issue