Changes for the race condition check