fixes #420

the issue was in the setInventorySlotContents funtion