Detect and correct errors in data transmission