fix critical typo in Redis connection creation, and reset connection when an exception is thrown