fix closing of redis