Updated target logic a bit to prepare for pubid.