fixed bug with duplicating attributes in the output