Temporarily fixed issue where losing the device would cause program crashes. It's very inefficient but works for now.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>