[Fix] fixed scope for array "targets"