Text string from Bluetooth not interpreted!

Hello, I am asking for help because I cannot understand where I am wrong.
I made an app to send text strings to an Arduino sketch and it works fine. The only thing that doesn't work for me is the disconnection of the bluetooth between the app and the arduino when I'm done. In practice, pressing an "Arduino" button sends twice an "OFF" text string to the app (it is the only text that the app receives ... otherwise it only sends) but the interpretation of this string does not happen and indeed it is not decoded.
I am attaching the piece of blocks concerned and the lines of the sketch concerned. Hoping he can come to terms with it.
Thank you

if (digitalRead(P4) == LOW && statoLCD == true && prog == 1 && millis() - tdeb >= 300) {
    prog = 0;
    EEPROM.commit();
    EEPROM.end();
    lcd.clear();
    lcd.setCursor(0, 1);
    lcd.print(F("Fine Programmazione"));
    conn = 2;
    //line = "OFF";
    SerialBT.println("OFF");
    SerialBT.println();
    delay(1000);
    SerialBT.println("OFF");
    SerialBT.println();
}

All solved ... I had unnecessarily complicated my life: D
Thank you