some more error detection