error detection fix