Fix close error.