title: Unity firebase bug in changing type of value in foreach
body: <p>I'm using firebase realtime database for ranking system in my game.
  But everytime I try to change the type of value from Datasnapshot's child, it seems to get out of foreach</p>
  
  <pre><code>string cashierChild = "score_cashier";
  
  FirebaseDatabase.DefaultInstance.GetReference("users").OrderByChild(cashierChild).LimitToLast(10)
      .GetValueAsync().ContinueWith(task =&gt;
      {
          if (task.IsFaulted)
          {
              Debug.Log("Failed To Load");
          }
          else if (task.IsCompleted)
          {
              int rank = 0;
              DataSnapshot snapshot = task.Result;
              foreach (var item in snapshot.Children)
              {
                  rank = rank + 1;
                  Debug.Log("Rank: " + rank + ", nickname: " + item.Child("nickname").Value + ", score: " + item.Child(cashierChild).Value);
                  Debug.Log((int)item.Child(cashierChild).Value);
              }
          }
  
      });
  </code></pre>
  
  <p>result of above code</p>
  
  <p><a href="https://i.stack.imgur.com/SaCdv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SaCdv.png" alt="withTheCode"></a></p>
  
  <p>it prints whole ranking definitely really well when I didn't call below code</p>
  
  <pre><code>Debug.Log((int)item.Child(cashierChild).Value);
  </code></pre>
  
  <p>withoutTheCode</p>
  
  <p><a href="https://i.stack.imgur.com/zu0EG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zu0EG.png" alt=""></a></p>
  
  <p>So I though it's because of type casting like (string) or (int)</p>