target: fix init_targets script handling