More correct error detection