corrected nasty bug in addnode