error when comparing values fixed