Fix node delete bug