Move the atts object inside the for loop.