fixed duplicate node creation #37 and #38