Updated code a bit to make sure the slot has items