Fix bug when choosing level of parallelism