fixed last_offset save bug
added remote index management to client library