connect multiple wiegand readers to esp8266 using arduino

Hello
I want to connect two RFID readers to a single ESP8266 module . So I have used the wiegand Liberary which I downloaded from here :

Then I used the liberary example and modified it for 2 readers .

#include <Wiegand.h>

WIEGAND wg0;
WIEGAND wg1;
void setup() {
 Serial.begin(9600);  
 
 // default Wiegand Pin 2 and Pin 3 see image on README.md
 // for non UNO board, use wg.begin(pinD0, pinD1) where pinD0 and pinD1 
 // are the pins connected to D0 and D1 of wiegand reader respectively.
 wg0.begin(D4,D3);
        wg1.begin(D2,D1);
  
}

void loop() {
 if(wg0.available())
 {
 Serial.print("Wiegand HEX from RD1= ");
 Serial.print(wg0.getCode(),HEX);
 Serial.print(", DECIMAL = ");
 Serial.print(wg0.getCode());
 Serial.print(", Type W");
 Serial.println(wg0.getWiegandType());    
 }
 if(wg1.available())
 {
    Serial.print("Wiegand HEX from RD2= ");
    Serial.print(wg1.getCode(),HEX);
    Serial.print(", DECIMAL = ");
    Serial.print(wg1.getCode());
    Serial.print(", Type W");
    Serial.println(wg1.getWiegandType());    
  }
}

I have connected my Node mcu module to the readers via a level converter . D4 and D3 are connected to reader 1 , D2 and D1 are connected to reader 2
The problem is that when reader 1 sends data sometimes the esp says that it is from reader 2 and vice versa. so I can’t understand which reader has read the card.
could you please help me find the problem ?

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.