bugfix in inventoryjs and added index-main-logic