fixing adding node bugs