Fixed bug with redis connection