fixed wrong return on put {ok, {out, Ref}} ->  {ok, {Key, Key}}