small enhancements in templates