Fixed length issue with sample value.
Fixed unicode issues with redis.