You need to re-think how you are going about doing things. What you are essentially telling the processor in your code is 'did you see an H?, if so, go and flash the led for x amount of times, and come back when you are done.' The processor is busy in your LED flashing routine when you send a stop command (or any other...)
What you need to do is more like 'Did I see an H? Yup? Ok, mark down the LED should be flashing. Then, based on the variables, what do I need to do just this time through the loop?'
I have put together something like that in the code like below. There are other samples like that on the learning website - check out nodelay, for example. Notice how delay() isn't called, and while, for, etc... I simply just check to see if it is time to do anything new, if not, I happily return and try again next turn.
#define LEDPIN 13
#define PERIOD 1000
bool bFlashLed = false;
int bLastLedState = LOW;
unsigned long uLastChange =0;
// read serial, set state of our device. Don't do the work yet, just mark our
c = Serial.read();
bFlashLed = true;
bFlashLed = false;
// call our worker functions that do stuff.
// if we had a servo to work with, we could call DoServo or any other work functions here.
// handle our actual work here.
uLastChange = millis();
bLastLedState=(bLastLedState == HIGH? LOW:HIGH);
else if(bLastLedState == HIGH)
// in case we cancelled with the LED on, reset it.
bLastLedState = false;