fixed issue with removing nodes