fixed the error when there is no templates in survey template page