RFID, Temperature, LCD project stopping in "if(rfid.isCard())" statement

I am doing this project where I am using an RC522 RFID reader, DHT11 temperature and humidity sensor, and a 20x4 I2c LCD screen. The goal is to have the LCD screen constantly displaying the temperature and humidity and when I scan an RFID card it will print either “Access Granted” or “Access Denied!” on the screen below the temperature and humidity and currently the temperature and humidity are displaying properly, but the RFID code isn’t being properly executed, I tested the RFID code in a separate sketch without the LCD code and it works perfectly fine, I changed nothing in doing this. I tried putting some Serial.print’s in to see where the code was stopping and it stops when entering the “if(rfid.isCard())” if statement, I don’t know why because it gets through that no problem in its own sketch, my theory is something with the LCD code is interfering but I don’t know what. Here’s the code:

/*
* Pin layout should be as follows (on Arduino Uno) for RFID reader:
* MOSI: Pin 11 / ICSP-4
* MISO: Pin 12 / ICSP-1
* SCK: Pin 13 / ISCP-3
* SS/SDA: Pin 10
* RST: Pin 9
*/

#include <dht11.h>  //Temperature and humidity sensor library
#include <Wire.h> //Library
#include <LiquidCrystal_I2C.h>  //LCD library

byte thermometer[8] = //icon for thermometer
{
    B00100,
    B01010,
    B01010,
    B01110,
    B01110,
    B11111,
    B11111,
    B01110
};

byte droplet[8] = //icon for water droplet 
{
    B00100,
    B00100,
    B01010,
    B01010,
    B10001,
    B10001,
    B10001,
    B01110,
};

//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  //Set the LCD I2C address
dht11 DHT11;

#define DHT11PIN 2 //Sensor signal pin connected to D2


#include <RFID.h> //RFID library
#include <SPI.h>  //RFID library

#define SS_PIN 10 //RFID reader SS pin
#define RST_PIN 9 //RFID reader RST pin

RFID rfid(SS_PIN,RST_PIN);


int red = 7; //red LED
int green = 6; //green LED
int buzzer = 5; //buzzer
int power = 8; //Open pin for servo (not currently in use)
int serNum[5];  //Number of sets of numbers read off card
int cards[][5] = {  //Permitted cards
  {25,207,141,14,85}, //RFID card 1
  //{226,128,145,133,118} //RFID card 2 (commented out for experimental purposes)
};

bool access = false;  //initalizes int access as false

void setup(){

    Serial.begin(9600); //Starts serial monitor at 9600 baud
    SPI.begin();  //initializes SPI
    rfid.init();  //initializes RIFD

    pinMode(red, OUTPUT); //sets red LED pin as output
    pinMode(green, OUTPUT); //sets green LED pin as output
    pinMode(buzzer, OUTPUT);  //sets buzzer LED pin as output

    digitalWrite(red, HIGH); //Sets red LED state as off (i am using an RGB LED, so HIGH = OFF and LOW = ON)
    digitalWrite(green, HIGH);  //Sets green LED state as off
    digitalWrite(buzzer, LOW);  //Sets buzzer state as off

    Wire.begin();
    lcd.begin(20,4);         //Initialize the LCD for 20 chars 4 lines, turn on backlight
    lcd.backlight();
    lcd.clear();  //clears LCD screen
     lcd.createChar(1,thermometer); //Creates thermometer and droplet
     lcd.createChar(2,drop);
     
Wire.beginTransmission(0x68);
Wire.write(0x07); // move pointer to SQW address
Wire.write(0x10); // sends 0x10 (hex) 00010000 (binary) to control register - turns on square wave
Wire.endTransmission();
   
}

void loop()
{
  rfid_card();  //calls RFID loop
  temp_read();  //calls TEMP loop
}

void rfid_card()  //RFID loop
{
    
    if(rfid.isCard()){  //If RFID reader has found a valid card do this
    
        if(rfid.readCardSerial()){
            Serial.print(rfid.serNum[0]); //Prints RFID card serial number
            Serial.print(" ");
            Serial.print(rfid.serNum[1]);
            Serial.print(" ");
            Serial.print(rfid.serNum[2]);
            Serial.print(" ");
            Serial.print(rfid.serNum[3]);
            Serial.print(" ");
            Serial.print(rfid.serNum[4]);
            Serial.println("");
            
            for(int x = 0; x < sizeof(cards); x++){ //Sets int x as 0 then increases it by 1 until it reaches the last digit of the serial number
              for(int i = 0; i < sizeof(rfid.serNum); i++ ){  //Sets int i as 0 then increases it by 1 until it reaches the last digit of the serial number
                  if(rfid.serNum[i] != cards[x][i]) { //If RFID serial number is not equal to card serial numbers and int x and int i do this
                      access = false; //Sets int access to false
                      break;  //breaks out of for loop
                  } else {  //Otherwise do this
                      access = true;  //Sets int access to true
                  }
              }
              if(access) break; //If access is true break out of for loop
            }
           
        }
        
       if(access){  //If access = true do this
          lcd.setCursor(4, 2);  //character 4 of line 2
          lcd.print("Access Granted");  //Prints this on LCD
           digitalWrite(green, LOW);  //Turns green LED on
           digitalWrite(buzzer, HIGH); //Turns buzzer on
           delay(1000); //1 second delay/pause
           digitalWrite(green, HIGH); //Turns green off
           digitalWrite(buzzer, LOW); //Turns buzzer off
           digitalWrite(power, HIGH); //Turns power pin on
           delay(1000); //1 second delay/pause
           digitalWrite(power, LOW);  //Turns power pin back off
           
      } else {  //Otherwise do this
           lcd.setCursor(4, 2); //character 4 of line 2
           lcd.print("Access Denied!"); //prints this on LCD
           digitalWrite(red, LOW);  //Turns red LED on
           digitalWrite(buzzer, HIGH);  //Turns buzzer on
           delay(500);  //Half-a-second delay/pause
           digitalWrite(red, HIGH); //Turns red LED off
           digitalWrite(buzzer, LOW); //Turns buzzer off
           delay(500);  //Half-a-second delay/pause
           digitalWrite(red, LOW);  //Turns red LED on
           digitalWrite(buzzer, HIGH);  //Turns buzzer on
           delay(500);  //Half-a-second delay/pause
           digitalWrite(red, HIGH);  //Turns red LED off
           digitalWrite(buzzer, LOW);  //Turns buzzer off
       }        
    }
    
    
    
    rfid.halt();  //Stop RFID reader

}

void temp_read()  //TEMP loop
{
  int chk = DHT11.read(DHT11PIN); //creates int chk
  lcd.setCursor(4, 0);  //character 4 of line 0
  lcd.write(1); //draws thermometer on LCD
  lcd.setCursor(6, 0);  //character 6 of line 0
  lcd.print((((float)DHT11.temperature*1.8)+32), 0);  //converts *C to *F and prints on LCD
  lcd.setCursor(8, 0);  //character 8 of line 0
  lcd.print((char)223); //draws degree sign on LCD
  lcd.print("F"); //Fahrenheit
    
  lcd.setCursor(11, 0); //character 11 of line 0
  lcd.write(2); //draws droplet on LCD
  lcd.setCursor(13, 0); //character 13 of line 0
  lcd.print((float)DHT11.humidity, 0);  //Prints humidity on LCD
  lcd.print("%"); //percent humidity
  delay(2000);  //2 second delay/pause
}

are you sure about your for loop until sizeof(cards) ?