fix bug for redis