fixing error where new nodes could not be created