Remove some unnecessary .item() calls.