Fix close issue