fix accept history memory bug