fix a permission bug
fix null pointer exception if closing device when connection is null
removed unused menu item