general template fixes