pfree fixes