Fix parser state cleanup.