fix oom exception bug