fixing bugs for rfid controller