fix bug in local task execution