Fixed bug when Attribute class is extended