fixing corrupted data