more allocation fixes (use snapshotting)