fixes node shutdown

closes #183