Fix device still showing up after replug.

Fixes #20 and possibly the shutdown issue Paul was having.