Fix CPU-exhaustion issue.