F8 bug

This is a minor bug that I have discovered a while back which is when you open the F8 menu while holding keys the game will consider them still pressed until you close F8 again. So for example if my character is running and I press F8 then release the keys and close F8 menu my character will keep running.