Revert 069b6dd which introduced a bug that causes data not to be fully parsed.

This reverts commit 069b6dd497edd80b50df012d239009cddd9acbfe.