Fixed OOM issues.