lmk: backport from xz and add some little stuf
fix build
oom: fix build