template fixes and updates