Fix redis error. Bug added in commit 6ac991a5de59