bugfix: read all data before starting parser.