Added a little wait before entering a critical region. Initialized the waitingLists