Fixed bug in text response data structure, fixed template rendering