patch to enable --threads