Change to check if the slot number is greater than the inventory size than 9