correctly clean up after channel