fix attribute definition order