Fix #146, #147: Entity Template: Fix wong entity_id() usage.