set attribute length to its type length