fix name coversation and adeed default attribute 'type'