cleanup and finish chat