fix a OOM crash