fix bug Close() error