NULL references to translate rg/pg to avoid double free