Fix missing templates bug