Flash game character animation AS3

I have a character with different animations set up for jumping, walking and standing.

I have set it up so that when pressing the up arrow I gotoAndStop at the jumping animation, pressing the left or right arrows goes to the walking animation and when nothing is pressed I get the standing animation. The problem arises when I press both up and left/right buttons at once. Then the jump animation sticks and doesn’t cancel until I let go of both…even when the character isn’t actually jumping!

I am using Flash CS3.

Any help?