fixed the buildTask bug