fixed bug where nodes couldnt be added after deleting a node