A few fixes. 

d.length