fixed bugs with inventory