fix parallel processes count logic