Fixed #4: Subprocess terminated when graph window is closed.