bug fixed for large multi threaded data sets