fixing contention bug