     toClear = device.set(sessionContext.deviceData, ['VirtualParameters', vparams[i][0]], timestamp, vpu, toClear)
 
   clear(sessionContext, toClear, (err) ->
-    return rpcRequest(sessionContext, null, callback)
+    return callback(err) if err
+    rpcRequest(sessionContext, null, callback)
   )
 
 

              toClear = device.set(sessionContext.deviceData, p, timestamp, {value: [timestamp, v]}, toClear)
      )

      if toClear
        return clear(sessionContext, toClear, (err) ->
          return callback(err) if err
          if sessionContext.deviceData.changes.has('prerequisite')
            delete sessionContext.syncState
            device.clearTrackers(sessionContext.deviceData, 'prerequisite')
          return rpcRequest(sessionContext, null, callback)
        )

      if sessionContext.deviceData.changes.has('prerequisite')
        delete sessionContext.syncState
        device.clearTrackers(sessionContext.deviceData, 'prerequisite')
        return rpcRequest(sessionContext, null, callback)

      provisions = generateSetVirtualParameterProvisions(sessionContext, sessionContext.syncState.virtualParameterDeclarations[inception])
      if not provisions

  if sessionContext.rpcRequest?
    return callback(null, null, generateRpcId(sessionContext), sessionContext.rpcRequest)

  if sessionContext.deviceData.changes.has('prerequisite')
    delete sessionContext.syncState
    device.clearTrackers(sessionContext.deviceData, 'prerequisite')

  if sessionContext.virtualParameters.length == 0 and
      sessionContext.declarations.length == 0 and
      not _declarations?.length and
