Temporary fix to avoid running threads in parallel