Fix sub task execution bug on multiple hosts