Fix bug in redis check