Bug correction in append_attributes_and_types

* The last element was ignored