fix text response logic