fixed issues with parsing on error and too many elements created porblems