Fixed handling of dangling links