Bug fixes for build task.