More template fixes