fixed typos
improved resetNodes