Fixed parent reference for line element cleanup.