fixes for template