Tried to fix Java heap out of mem bug.