fix race-condition stems from redis library