Correct error check variable and condition.