Fixed node deletion script