fix race condition in redis queue and working counter