fixed GetRawData
changes for error location