fixed node deletion bug