minor fixes for templates