Debug the grains.item() issue