Riak Fixed

Copy of #1408 from @ZaidM rebased to `master`