Fixed null pointer exceptions when dead links encountered.