Fixed wrong output on single thread, turned out it was a misallocated array size.