Fixed typo and renamed params.threads to params.cpus