Fix delete node (fixes #250)