Update at_entity_template.inc

Hm, very ugly code for now :D