fixed OOM errors