update class in a repeating template not working