one thing that might have got you is that the directional input locks out while the attack animation is playing, so if you pressed the attack button a frame sooner then a direction, you could get locked into your old direction for the attack.