fixed close bug