fix type attribute