Fix template aapid