 							hostJobs[c.node.name].lastseen = ~~((new Date).getTime() / 1000)
 						syncJobs c.node.name, c.jobIds
 						datalog.gauge 'task_processing', c.jobIds.length, [ 'worker:' + c.node.name ] if c.jobIds? and Array.isArray(c.jobIds)
-					if c.id
+					if c.id and findinque(c.id)?
+						jobItem = findinque(c.id)
 						switch c.status
 							when 2 # job taken
-								findinque(c.id)?._status = "working"
-								findinque(c.id)?._takenby = c.node.name if c.node?.name?
-								findinque(c.id)?._lastchange = ~~((new Date).getTime() / 1000)
+								jobItem._status = "working"
+								jobItem._takenby = c.node.name if c.node?.name?
+								jobItem._lastchange = ~~((new Date).getTime() / 1000)
 							when 3 # job finished
 								if c.error
 									# error on the job
-									jobItem = findinque(c.id)
+									
 									if jobItem._status is "working" and jobItem._takenby is c.node.name
 										jobItem._status = "errored"
 										jobItem._lastchange = ~~((new Date).getTime() / 1000)

						s_wc.send JSON.stringify(
							id: c._id
							status: 2
							idtype: c.idtype
							node:
								name: os.hostname()
								loadavg: os.loadavg()

							when "new"
								act._status = "tofetch"
								act._lastchange = ~~((new Date).getTime() / 1000)
								getDocsCargo.push act._id
							when "tosend"
								act._status = "onqueue"
								act._lastchange = ~~((new Date).getTime() / 1000)
