fixed an update inventory bug