template repeat issues