Fix a bad attribute name.
Prevent errors when the length is too long.
Simplify code. #performance