Refine add statement mechanism. Bug fixed for link two nodes