         handleWriteRfid(path);
         returnOK();
         return;
-      } else if(server.hasArg("play") && switchFolder((char *)path.c_str())) {
+      } else if (server.hasArg("play") && switchFolder((char *)path.c_str())) {
         stopMp3();
-        yield();
         playMp3();
+        playingByCard = false;
         returnOK();
         return;
       }

}

void playMp3() {
  SdFile file;
  SD.vwd()->rewind();


// Init array that will store new card uid
byte lastCardUid[4];
bool playing = false;
bool playingByCard = true;
bool pairing = false;
String currentFile = "";

SdFat SD;
SdFile uploadFile;

unsigned long lastRfidCheck;

void setup() {
  // Seems to make flashing more reliable
