cleanup, using right IDs for nodes