Fixed data/rawdata buffer bug