Some fixes with inventory and events