fixed bug in data processing.