Redis fixes

I put the changes in a new branch. Don't know how to update the other pull request.