Fix some issues for init task