IE & relatedTarget again

PR #401 was not complete. My intention was to set the relatedTarget
to null if we run into one of these invalid relatedTargets.