All I can say is that you have to remember that your units will not stop firing until their animation cycle is complete. Aside from that, don't engage in melee until all your arrows have been shot.