inspector: fix tear-down when quitting [fixes #25]