set relatedTarget = native target before rewriting target