chan close bug fix