Fixed Index Bug, Inventory closes after clicking outside the inventory