Bugfixed merging results from multiple threads