         for k of reference
           continue if k[0] == '_'
           if not actual[k]?._timestamp? or actual[k]._timestamp < lastBootstrap
-            _tasks.push({device: currentRequest.session.deviceId, name : 'refreshObject', objectName : reference[k]._path})
+            _tasks.push({device: currentRequest.session.deviceId, name : 'refreshObject', objectName : reference[k]._path, timestamp : now})
           else
             traverse(reference[k], actual[k])
 

        db.devicesCollection.insert({_id : currentRequest.session.deviceId, _registered : now, _deviceId : deviceIdDetails}, (err) ->
          throw err if err
          util.log("#{currentRequest.session.deviceId}: New device registered")
          _tasks.push({device: currentRequest.session.deviceId, name : 'refreshObject', objectName : ''})

          for cmd in customCommands.getDeviceCustomCommandNames(currentRequest.session.deviceId)
            _tasks.push({device: currentRequest.session.deviceId, name: 'customCommand', command: "#{cmd} init"})

          apiFunctions.insertTasks(_tasks, {}, () ->
            updateAndRespond()


        for cmd in customCommands.getDeviceCustomCommandNames(currentRequest.session.deviceId)
          if not (deviceCustomCommands[cmd]?._timestamp < lastBootstrap)
            # Increment timestamp by one millisecond to ensure it runs after any refresh task
            _tasks.push({device: currentRequest.session.deviceId, name: 'customCommand', command: "#{cmd} init", timestamp: new Date(now.getTime() + 1)})
          delete deviceCustomCommands[cmd]

        for cmd of deviceCustomCommands
