fix bugs in build tasks