bug fixes for templates