Fixing Parser getting stuck and OOM-ing