fix OOM condition a bit