 					name:   @name
 					clientid: @clientid
 					build: @s.bversion
-				if not @initialized
+				if @initFromLocalStorage
+					opts.cmd = "cv:#{@data.last_cv}"
+				else if not @initialized
 					opts.cmd = index_query
+				console.error opts,  @initFromLocalStorage
+				@initFromLocalStorage = 0
 				@send("init:#{JSON.stringify(opts)}")
 				console.log "#{@name}: sent init #{JSON.stringify(opts)} waiting for auth"
 			else

				else if op is 'M'
					s_data = @data.store[id]
					if ('sv' of change and s_data? and s_data['version']? and s_data['version'] == change['sv']) or !('sv' of change) or (change['ev'] == 1)
    					if not s_data?
        					@data.store[id] =
            					'id'        :   id
            					'object'    :   {}
            					'version'   :   null
            					'last'      :   null
            					'change'    :   null
            					'check'     :   null
        					s_data = @data.store[id]
#                        console.log "#{@name}: processing modify for #{JSON.stringify(s_data)}"
    					orig_object = @jd.deepCopy s_data['object']
    					s_data['object'] = @jd.apply_object_diff s_data['object'], change['v']
    					s_data['version'] = change['ev']

    					new_object = @jd.deepCopy s_data['object']

    					if not ('local' of change)
#                            setTimeout do(change, new_object, orig_object) =>
#                                => @_notify_client change['id'], new_object, orig_object, change['v']
        					@_notify_client change['id'], new_object, orig_object, change['v'], change['ev']
					else if s_data? and s_data['version']? and change['ev'] <= s_data['version']
    					console.log "#{@name}: old or duplicate change received, ignoring, change.ev=#{change['ev']}, s_data.version:#{s_data['version']}"
					else
    					if s_data?
        					console.log "#{@name}: version mismatch couldnt apply change, change.ev:#{change['ev']}, s_data.version:#{s_data['version']}"
    					else
        					console.log "#{@name}: version mismatch couldnt apply change, change.ev:#{change['ev']}, s_data null"
    					if s_data?
        					@data.store[id]['version'] = null
    					reload_needed = true
				else
					console.log "#{@name}: no operation found for change"
				if not reload_needed

			@data.store[id]['id'] = id
			@data.store[id]['object'] = data
			@data.store[id]['version'] = parseInt(version)
			@_save_entity id

			notify_cb id, data_copy, version
			@notify_index[id] = true
