Fix directory mode and node attribute.

Few small mistakes here.