$templates is empty because is no initialized.