Replaced 'state' for 'attribute' in templates.