Fix riak session and input refactoring