title: XNA - Freezing Menu Error
body: <p>When I click the down arrow it gets stuck on the second selection and up or down no longer work, how would I fix that?</p>
  
  <p>Second Question: How to prevent freezing when changing menu items? When I change menu items, it freezes of the second selection. Here is the code concerning this question;</p>
  
  <pre><code>keyboard = Keyboard.GetState();
  mouse = Mouse.GetState();
  
      if (keyboard.IsKeyUp(Keys.Up) &amp;&amp; prevKeyboard.IsKeyDown(Keys.Down))
      {
          if (selected &gt; 0) selected--;
          else selected.Equals(buttonList.Count - 1);
      }
  
      if (keyboard.IsKeyUp(Keys.Up) &amp;&amp; prevKeyboard.IsKeyDown(Keys.Down))
      {
          if (selected &lt; buttonList.Count - 1) selected++;
          else selected.Equals(0);
      }
  
      prevMouse = mouse;
      prevKeyboard = keyboard;
  }
  </code></pre>