Only appends attribute if applicable