Added the missing call to node.stop() in spin()