fixed bug to add inventory