Fixed bugs caused by destruct of Attribute class.