Fixing bugs on redis and adding support for riak