 										console.log "invalid doc",item.id
 										index = findplace(item.id)
 										workque[index].status = "dropped"
-						callback()
+								callback()
+						
 			), config.readBatchsize)
 			syncJobs = (host, jobs) ->
 				if host? and Array.isArray(jobs)

							console.log 'error while getting DB data', bulkerr
							setImmediate ->
								getDocsCargo.push couch_toprocess
								return
						else
							for item in bulkbody.rows
								if item?.doc?.exec?

				if !r.ready or os.freemem() < config.minMem * 1048576
					setImmediate ->
						getDocsCargo.push couch_toprocess
						callback()
				else
					keys = []
					keys.push key for key in couch_toprocess
