fix bug for inventory id