Fixed the test cases and a bug in the subshell parallelization