Replace template with correct one