ending statefull chat