Better error detection