Fix: a minor bug in setting up type attributes.