fixed close crash bug