fixing inventories controller